<?php

$flag = true;

$loginpath = templet('login', 'index');
if (file_exists($loginpath)) {
    include $loginpath;
    $flag = false;
}

if ($flag) {

?>
<link rel="stylesheet" href="/shop/templates/default/home/login/Css/common.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="/shop/templates/default/home/login/Css/jumei_sign.css" type="text/css" media="screen" charset="utf-8" />
<script src="/shop/templates/default/home/login/Scripts/es5-shim.js"></script>
<script src="/shop/templates/default/home/login/Scripts/es5-sham.js"></script>
<link href="<?php echo SHOP_TEMPLATES_URL;?>/css/home_login.css" rel="stylesheet" type="text/css">

<?php
    $config = Model('setting')->getListSetting();
    @include dirname(BASE_PATH) . '/shop/templates/' . $config['template_name'] . '/fix_member.php';
?>




<style>
    .top_nav_hot{ position: absolute;left:81px;top:-4px;}

</style>
<div id="header_container">
    <!--新版的login页面没有头部 -->
    <div id="logo">
        <a href="/" id="home" >
            <img height="85" src="<?php echo UPLOAD_SITE_URL.DS.ATTACH_COMMON.DS.$output['setting_config']['site_logo']; ?>" alt="">
        </a>
        <div class="header_logo_box">
            <?php echo loadadv(40);?>
            <?php echo loadadv(41);?>
            <?php echo loadadv(42);?>
        </div>
    </div>
</div>

<script>
    $(document).ready(function () {
    $(".top_hot").hover(function () {
    $(".top_nav_hot").css("display","none")
    },
    function () {
    $(".top_nav_hot").css("display","block")
    }
    );
    });
</script>
<style>
    #footer{
        display: block !important;
    }

    #footer {
        display: none !important;
    }
    #footer.wrapper{
        display: block !important;
    }
    #footer .footer_link{
        display: block;
    }
</style>

<link href="/shop/templates/default/home/login/Css/login.css" rel="stylesheet"/>
<script>
     var REDIRECT = '';
     var IS_OPEN_PASSPORT = 1;
     var SHOW_VERIFY_CODE = '';
     var DYNAMIC_VERIFY_TYPE = 'hash_code';
     window.isOpenDynamicLogin = true;
     window.dynamicSmsExpireTime = 15;
</script>

<div class="sign loginpage">
    <div class="loginWrap">
        <div class="loginBoardWrap">
            <style>
                .loginImage{
                    background: none;
                }

                .loginImage a{
                    position: absolute;
                    left: 0;
                    top: 0;
                }
            </style>

            <div class="loginImage" style="position: relative;">
                <?php echo loadadv(44);?>
            </div>
            <div class="loginBord">
                <div class="loginTit">
                    <div class="tosignup">还没有商城账号？<a href="index.php?act=login&op=register">30秒注册</a></div>
                    <h1><strong>登录商城</strong></h1>
                </div>
                <div class="radio_wrapper">
                    <span>
                        <input name="method" type="radio" rel="login-dynamic-form" value="dynamic" id="radio_dynamic"/>
                        <label for="radio_dynamic">
                            手机动态密码登录
                        </label>
                    </span>
                    <span>
                        <input name="method" type="radio" rel="login-user-form" value="normal" id="radio_normal"/>
                        <label for="radio_normal">
                            普通登录
                        </label>
                    </span>
                </div>
                <form id="login-dynamic-form" action="">
                    <input type='hidden' name='formhash' value='aLN7YQaDEDDDJMLpb7N8WZPyAOBEzTF' />        <input type="hidden" name="form_submit" value="ok" />
                    <input name="nchash" type="hidden" value="2222e6cf" />

                    <div class="textbox_ui user">
                        <input type="text" placeholder="已注册的手机号码" id="dynamic_mobile" autofocus autocomplete="off" value="">
                        <div class="focus_text">请输入11位手机号码</div>
                        <div class="invalid">
                            <i></i>
                            <div class="msg"></div>
                        </div>
                    </div>
                    <div class="gtVerifyWrap">
                        <div class="textbox_ui">
                            <p class="gtHeader">请拖动下方的滚动条，完成拼图验证</p>
                            <div class="clearfix">
                            </div>
                            <div id="dynamic_gt_verify"></div>
                            <div class="invalid">
                                <i></i>
                                <div class="msg"></div>
                            </div>
                        </div>
                    </div>
                    <div class="verityWrap">
                        <div class="textbox_ui">
                            <input type="text" placeholder="验证码" autocomplete="off" id="dynamic_verify_code" maxlength="4">
                            <div class="focus_text">按右图填写，不区分大小写</div>
                            <div class="invalid">
                                <i></i>
                                <div class="msg"></div>
                            </div>
                        </div>
                        <span id="change_dynamic_verify_code"><img src="">换一张</span>
                    </div>
                    <div class="dynamic_pass_wrap line">
                        <div class="textbox_ui dynamic_pass pass">
                            <input type="text" placeholder="动态密码" id="dynamic_password" autocomplete="off">
                            <div class="focus_text">请点击获取手机动态密码</div>
                            <div class="hint"></div>
                            <div class="invalid">
                                <i></i>
                                <div class="msg"></div>
                            </div>
                        </div>
                        <a href="javascript:;" id="getPhoneCode" class="phonecode"><strong>获取手机动态密码</strong></a>
                    </div>
                    <p>
                        <label for="dynamic_auto_login">
                            <input type="checkbox" id="dynamic_auto_login" checked>
                            &nbsp;自动登录
                        </label>
                    </p>

                    <input class="loginbtn submit_btn" type="submit" value="登 录" style=" display: block;width: 100%;">
                </form>
                <form id="login-user-form" method="post" action="index.php?act=login&op=login">
                    <?php Security::getToken();?>
                    <input type="hidden" name="form_submit" value="ok" />
                    <input name="nchash" type="hidden" value="<?php echo getNchash();?>" />
                    <input type="hidden" name='ref_url' value='<?php echo $_GET[ref_url]?>'>
                    <div class="textbox_ui user">
                        <input type="text" placeholder="用户名" name='user_name' id="username" autofocus autocomplete="off" value="">
                        <div class="focus_text">请输入登录名</div>
                        <div class="invalid">
                            <i></i>
                            <div class="msg"></div>
                        </div>
                    </div>
                    <div class="textbox_ui pass">
                        <input type="password" placeholder="密码" name='password' id="login_password" autocomplete="off">
                        <div class="focus_text">请输入您的密码，您的密码可能为字母、数字或符号的组合</div>
                        <div class="invalid">
                            <i></i>
                            <div class="msg"></div>
                        </div>
                    </div>
                    <div class="gtVerifyWrap">
                        <div class="textbox_ui">
                            <p class="gtHeader">请拖动下方的滚动条，完成拼图验证</p>
                            <div class="clearfix">
                            </div>
                            <div id="gt_verify"></div>
                            <div class="invalid">
                                <i></i>
                                <div class="msg"></div>
                            </div>
                        </div>
                    </div>
                    <div class="verityWrap">
                        <div class="textbox_ui">
                            <input type="text" placeholder="验证码" autocomplete="off" id="verify_code" maxlength="4">
                            <div class="focus_text">按右图填写，不区分大小写</div>
                            <div class="invalid">
                                <i></i>
                                <div class="msg"></div>
                            </div>
                        </div>
                        <span id="change_verify_code"><img src="">换一张</span>
                    </div>
                    <p>
                        <a href="index.php?act=login&op=forget_password" class="fr">忘记密码?</a>
                        <label for="auto_login">
                            <input type="checkbox" id="auto_login" checked>
                            &nbsp;自动登录
                        </label>
                    </p>
                    <input class="loginbtn submit_btn" type="submit" value="登 录" style=" display: block;width: 100%;">
                    <div id="errorMsg"></div>
                </form>
                <div class="iconAccout" >
                    <div>你也可以使用以下账号登录</div>
                    <p>
                        <?php if ($output['setting_config']['qq_isuse'] == 1){?>
                        <a href="<?php echo SHOP_SITE_URL;?>/api.php?act=toqq" class="a1" title="QQ">QQ</a>
                        <?php } ?>
                        <?php if ($output['setting_config']['sina_isuse'] == 1){?>
                        <a href="<?php echo SHOP_SITE_URL;?>/api.php?act=tosina" class="a3" title="新浪微博">新浪微博</a>
                        <?php } ?>
                        <?php
                            require_wechat();
                            require_once(dirname(BASE_PATH) . '/wxpay/lib/WxPay.Config.php');
                            $wechat = new WeChat(-1);
                            $redirect = urlencode('http://' . $_SERVER['HTTP_HOST'] . '/shop/index.php?act=login&op=wechat_login');
                            if(isset($_SESSION['wechat_openid'])){
                                if(time() - $_SESSION['wechat_openid']['time'] < 300){
                        ?>
                        <script>
                            $('[name=ref_url]').val('');
                        </script>
                        <?php
                                }
                            }

                            $url = "https://open.weixin.qq.com/connect/qrconnect?appid={$wechat->config['open_appid']}&redirect_uri={$redirect}&response_type=code&scope=snsapi_login&state=STATE#wechat_redirect"
                        ?>
                        <a href="<?php echo $url;?>" class="a6" title="微信">微信</a>
                    </p>
                    <p class="icon-p" style="display: none;">
                        <a href="/i/extconnect/?site_name=renren&amp;redirect=" class="a7" title="人人">人人</a>
                        <a href="/i/extconnect/?site_name=mogujie&amp;redirect=" class="a8" title="蘑菇街">蘑菇街</a>
                        <a href="/i/extconnect/?site_name=tuan800&redirect=" class="a9" title="团800">团800</a>
                        <a href="/i/extconnect/?site_name=xunlei&redirect=" class="a10" title="迅雷">迅雷</a>
                    </p>
                </div>
                <div class="shadow_l"></div>
                <div class="shadow_r"></div>
            </div>
        </div>
    </div>
</div>
</div>


</div>
<div class="clear"></div>
<script type="text/javascript">
 /*301 www域名跳转
  *jiel
  */
 $(function () {
     var cur_location = $.cookie('default_site_25') || '';
     if (cur_location == '') {
         $.getJSON(RM_SITE_MAIN_WEBBASEURL + 'i/ajax/getsite?callback=?', function (data) {
             cur_location = data.site;
         })
     }
     var url_host = window.location.host.slice(0,2); //获取当前地址域名

     if(url_host =='bj' || url_host =='sh'|| url_host =='gz' || url_host =='cd'){
         if(url_host != cur_location) {
             $.cookie('default_site_25',url_host,{expires: 1,path: "/",domain: RM_SITE_MAIN_TOPLEVELDOMAINNAME});
             cur_location = url_host;
         }
     }
     $("body").delegate("a,area", "click", function () {
         if(cur_location == ''){ cur_location ='www'};
         var href = $(this).attr("href") || '';
         if(href.indexOf('/i/deal/mobile_subscribe')<0 && href !=''){
             var reg = new RegExp("^(http://)(hd(?=.jumei.com)|huodong(?=.jumei.com)|www(?=.jumei.com/i/deal))(.*)$","i");
             var href =href.replace(reg, "$1"+ cur_location +"$3");
             $(this).attr("href",href);
         }
     })
 })
</script>


<!--*连续登陆探测 -->

<!--点击流用-->



<script type="text/javascript">
 $(function() {
// adwq
(function() {

    var new_signup = getCookie('new_signup');
    if ( new_signup !== null ){
        _adwq.push(['_setAction',
            '20rf07',
            RM_UID,       // 扩展参数, 可填 用户名 或 用户ID(可选)
            'new_signup' // 事件价值 (可选)
        ]);

        $.cookie('new_signup',null,{path:'/',domain:RM_SITE_MAIN_TOPLEVELDOMAINNAME});
    }


    var adw = document.createElement('script');
    adw.type = 'text/javascript';
    adw.async = true;
    adw.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://s') + '.emarbox.com/js/adw.js';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(adw, s);
})();


//<!--
    (function (d) {
        window.bd_cpro_rtid="rjfzrHc";
        var s = d.createElement("script");s.type = "text/javascript";s.async = true;s.src = location.protocol + "//cpro.baidu.com/cpro/ui/rt.js";
        var s0 = d.getElementsByTagName("script")[0];s0.parentNode.insertBefore(s, s0);
    })(document);
//-->
 });
</script>

<?php
    }
?>
